/**
 * @desc: 定义全局的filter方法
 * @author zhangqiang
 * @date 2022/2/8
*/
/**
 * @description 星期转换 18转 周二 周五
 * @param String: {val} 星期值
 * @return String: 周二 周五
 * @author xiongyi 2023-02-02 15:59:17
 **/
export function setWeakFn(val) {
    var items = [
        {
            key: 1,
            value: "周一"
        },
        {
            key: 2,
            value: "周二"
        },
        {
            key: 4,
            value: "周三"
        },
        {
            key: 8,
            value: "周四"
        },
        {
            key: 16,
            value: "周五"
        },
        {
            key: 32,
            value: "周六"
        },
        {
            key: 64,
            value: "周日"
        }
    ]
    var selectItems = ""
    items.forEach(element => {
        if ((val & element.key) == element.key) {
            selectItems += (element.value + " ");
        }
    });
    return selectItems;
}
